package com.cinemtl.beans;

import java.io.Serializable;
public class CartOrder implements Serializable{
		// Attributs
		private static final long serialVersionUID = 1L;
		private int id; //=idMovie
		private int nbTicket;

		// Getteurs et setteurs
		public int getId() {
			return id;
		}

		public void setId(int id) {
			this.id = id;
		}

		public int getNbTicket() {
			return nbTicket;
		}

		public void setNbTicket(int nbTicket) {
			this.nbTicket = nbTicket;
		}
		
		public void incNbTicket(int nbTicket) {
			this.nbTicket += nbTicket;
		}
		
		public void decNbTicket(int nbTicket) {
			if(this.nbTicket-nbTicket>=0)
				this.nbTicket -= nbTicket;
			else
				this.nbTicket=0;
		}

}
